package com.youpai.platform.chat.service.converter;

import com.youpai.platform.chat.service.entity.dto.ChatAccountDTO;
import com.youpai.platform.chat.service.entity.po.ChatAccountPO;

/**
 * @date: 2022/7/16 17:28
 * @author: Anna
 * @version: 1.0
 * @description: accountConverter
 */
public class ChatAccountConverter {

    /**
     * chatAccountDTO转成chatAccountPO
     *
     * @param chatAccountDTO chatAccountDTO
     * @return ChatAccountPO
     */
    public static ChatAccountPO convertChatAccountDTO2ChatAccountPO(ChatAccountDTO chatAccountDTO) {
        if (null == chatAccountDTO) {
            return new ChatAccountPO();
        }
        return new ChatAccountPO()
                .setUid(chatAccountDTO.getUid())
                .setAppId(chatAccountDTO.getAppId());
    }
}
